This invention relates to processors that have a plurality of application programs installed thereon, each of which has their own internally defined set of controls. The system for application independent programming of controls functions to provide a common programming model across the plurality of application programs and components.
It is a problem in application programs to provide a consistent programming model and functionality for the controls that are defined by a variety of application program and component vendors, as well as by individual users. This is because the application programs that are installed on a processor each have their own set of controls, which controls are typically inconsistent in their implementation across the plurality of application programs. This problem is especially relevant in an office suite type of environment on a personal computer, where there exists a common programming tool. The existence of the common programming tool raises users"" expectations for a common programming model for using controls. Without specific support in the programming tool, it is extremely difficult to attain such a common programming model. Each application program in the office suite would need to provide its own implementation of the controls by embedding the controls, which are provided by the underlying common programming tool, into an extended control, which is implemented in the application program, to modify the properties, methods and events of the embedded controls. Duplicating this work in all applications would result in inconsistent interfaces and operation of controls as well as increased cost of implementation due to the replication of the control programmability function across the various application programs. In addition, the updating of an application program can change the controls embedded therein, further exacerbating the inconsistency of control implementation across the plurality of application programs.
The above described problems are solved by the present system for application independent programming of controls which functions to provide a common programming model for a set of controls used in a plurality of application programs, such as those typically included in an office suite, installed on a processor, while also enabling customization of these controls for each application program. This is accomplished by producing an interface in an underlying common programming tool which enables a host application program to augment the properties, methods and events provided by the underlying controls by adding xe2x80x9cextenderxe2x80x9d properties, methods and in a consistent manner. The user can thus use a control in a variety of application programs, and have both a consistent experience as well as a customized experiencexe2x80x94xe2x80x9cconsistentxe2x80x9d in the sense that the functionality that is unique to the control is the same from application to application, and xe2x80x9ccustomizedxe2x80x9d in the sense that behavior that is unique to the control container is different from application program to application program. All of this is accomplished without having to replicate the underlying control programmability function on which the customization is based. The host application program creates an extender file to add and/or modify the standard properties, methods and events of a control. The resulting extender file is later used to produce an extended control for use in this application program. The system for application independent programming of controls merges, at run time, the standard control and the extender file to create the customized control. This enables application programs to create and use customized controls without having to replicate existing control programmability functions and also enables consistency of control implementation. The control can also be uniformly updated across the plurality of application programs by simply updating the underlying control on which the customized instances are based.
The system for application independent programming of controls is implemented, for example, in the Visual Basic for Applications (VBA) module of the Microsoft Office suite of application programs. The Microsoft Office suite of application programs comprises a VBA layer (also termed Visual Basic layer) on which is overlaid a plurality of application programs, including: PowerPoint, Word, and Excel. The Visual Basic layer interconnects with an Object Linking and Embedding (OLE) layer which is interposed between the Visual Basic layer and the host operating system. The Microsoft Office suite of application programs uses the present system for application independent programming of controls to offer a controls interface which enables each of the application programs to access a common set of controls. Each user of the application programs can access the common set of controls and thence customize a control for use in a selected one of the application programs.
The customization of the control is created when the user takes actions that make it clear that they would like to use a specific control in a specific application program. This application program calls the controls interface of the Visual Basic layer which produces a type library entry to describe the properties, methods and events of the extended control that the user has created. This application program also maintains a type description extender library wherein an extender is an object which implements the extender properties and methods supplied by the application program. These properties and methods are typically specific to the application program, in the use of visual controls, for example, it is common for different application programs to present different mechanisms for positioning the visual controls. In a word processor, for instance, it might be useful to position controls relative to text characters. In a spreadsheet, it might be useful to position controls relative to cells in the spreadsheet. In other application programs it may be most appropriate to position controls using a two-dimensional coordinate system. Each application program may use the extender mechanism to provide its own, application program specific, properties and methods. In the case of control positioning in a two-dimensional coordinate system, this could mean providing Top and Left properties, for example. A pointer to the extender entry is returned from the application program to the Visual Basic controls interface as an output parameter to link the standard control in the Visual Basic layer and its customization definition as maintained in the application program. At run time, the system for application independent programming of controls operates on the type definitions of extenders maintained in the application program""s standard library to implement the set of customized controls.